
RestrictionPosPrefix = "仅在"
RestrictionNegPrefix = "不在"
RestrictionSuffix = "上课"

"""
星期几
"""
class DayRule(object):
    def __init__(self, content, like_days=None, dislike_days=None):
        self.raw_content = content.replace(RestrictionSuffix, '')
        self.ld = like_days
        self.dld = dislike_days

    def parse(self):
        if not self.raw_content:
            self.ld = [1,2,3,4,5]
        if RestrictionPosPrefix in self.raw_content:
            tmp = self.content[2:]
        elif RestrictionNegPrefix in self.raw_content:
            pass
        
"""
第几节课
"""
class PeriodRule(object):
    def __init__(self, content, like_period=None, dislike_period=None):
        self.raw_content = content
        self.lp = like_period
        self.dlp = dislike_period

    def parse(self):
        pass



class OperatorRule(object):
    def __init__(self):
        pass

class LocationRule(object):
    def __init__(self, course_name, teacher_id):
        self.course = course_name
        self.teacher = teacher_id

    def parse(self):
        pass